.class public final Llt/farmis/libraries/apps_promo/AppsPromoDialog;
.super Landroidx/fragment/app/DialogFragment;
.source "AppsPromoDialog.kt"


# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
    value = "SMAP\nAppsPromoDialog.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AppsPromoDialog.kt\nlt/farmis/libraries/apps_promo/AppsPromoDialog\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,78:1\n1497#2,2:79\n*E\n*S KotlinDebug\n*F\n+ 1 AppsPromoDialog.kt\nlt/farmis/libraries/apps_promo/AppsPromoDialog\n*L\n44#1,2:79\n*E\n"
.end annotation


# instance fields
.field private final INTEREST_LEVEL_1:I

.field private final INTEREST_LEVEL_2:I

.field private final INTEREST_LEVEL_3:I

.field private _$_findViewCache:Ljava/util/HashMap;

.field private appsModelList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Llt/farmis/libraries/apps_promo/models/AppPromoModel;",
            ">;"
        }
    .end annotation
.end field

.field private callbacks:Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

.field private showDescriptions:Z

.field private final shownAt:J


# direct methods
.method public constructor <init>()V
    .locals 2

    .line 21
    invoke-direct {p0}, Landroidx/fragment/app/DialogFragment;-><init>()V

    .line 23
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iput-wide v0, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->shownAt:J

    const/16 v0, 0x3e8

    .line 25
    iput v0, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->INTEREST_LEVEL_1:I

    const/16 v0, 0xbb8

    .line 26
    iput v0, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->INTEREST_LEVEL_2:I

    const/16 v0, 0x1388

    .line 27
    iput v0, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->INTEREST_LEVEL_3:I

    .line 29
    invoke-static {}, Lkotlin/collections/CollectionsKt;->emptyList()Ljava/util/List;

    move-result-object v0

    iput-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->appsModelList:Ljava/util/List;

    const/4 v0, 0x1

    .line 30
    iput-boolean v0, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->showDescriptions:Z

    return-void
.end method


# virtual methods
.method public _$_clearFindViewByIdCache()V
    .locals 1

    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->_$_findViewCache:Ljava/util/HashMap;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Ljava/util/HashMap;->clear()V

    :cond_0
    return-void
.end method

.method public final getCallbacks()Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;
    .locals 1

    .line 22
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->callbacks:Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

    return-object v0
.end method

.method public final getUriIntent(Ljava/lang/String;)Landroid/content/Intent;
    .locals 2

    const-string v0, "packageName"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 63
    new-instance v0, Landroid/content/Intent;

    invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object p1

    const-string v1, "android.intent.action.VIEW"

    invoke-direct {v0, v1, p1}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    return-object v0
.end method

.method public onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
    .locals 3

    const-string p3, "inflater"

    invoke-static {p1, p3}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 33
    iget-object p3, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->callbacks:Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

    if-eqz p3, :cond_0

    invoke-interface {p3}, Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;->onShow()V

    .line 35
    :cond_0
    sget p3, Llt/farmis/libraries/apps_promo/R$layout;->apps_promo_dialog:I

    const/4 v0, 0x0

    invoke-virtual {p1, p3, p2, v0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p1

    .line 36
    invoke-virtual {p0}, Landroidx/fragment/app/DialogFragment;->getDialog()Landroid/app/Dialog;

    move-result-object p2

    const-string p3, "dialog"

    invoke-static {p2, p3}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {p2}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;

    move-result-object p2

    const/4 p3, 0x1

    invoke-virtual {p2, p3}, Landroid/view/Window;->requestFeature(I)Z

    const-string p2, "view"

    .line 38
    invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    sget p2, Llt/farmis/libraries/apps_promo/R$id;->dialogTitle:I

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p2

    check-cast p2, Landroid/widget/TextView;

    const-string p3, "view.dialogTitle"

    invoke-static {p2, p3}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    sget-object p3, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {p3}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getDialogTitle()Ljava/lang/String;

    move-result-object p3

    invoke-virtual {p2, p3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 39
    sget p2, Llt/farmis/libraries/apps_promo/R$id;->dialogHeader:I

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p2

    check-cast p2, Landroid/widget/RelativeLayout;

    sget-object p3, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {p3}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getDialogHeaderColor()I

    move-result p3

    invoke-virtual {p2, p3}, Landroid/widget/RelativeLayout;->setBackgroundColor(I)V

    .line 41
    iget-boolean p2, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->showDescriptions:Z

    if-eqz p2, :cond_1

    goto :goto_0

    :cond_1
    const/4 v0, 0x2

    .line 42
    :goto_0
    sget p2, Llt/farmis/libraries/apps_promo/R$id;->addsLayout:I

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p2

    check-cast p2, Landroid/widget/LinearLayout;

    const-string p3, "view.addsLayout"

    invoke-static {p2, p3}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {p2, v0}, Landroid/widget/LinearLayout;->setShowDividers(I)V

    .line 44
    iget-object p2, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->appsModelList:Ljava/util/List;

    .line 79
    invoke-interface {p2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object p2

    :goto_1
    invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z

    move-result p3

    if-eqz p3, :cond_3

    invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object p3

    check-cast p3, Llt/farmis/libraries/apps_promo/models/AppPromoModel;

    .line 46
    new-instance v0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;

    move-result-object v1

    if-eqz v1, :cond_2

    const-string v2, "this.context!!"

    invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-direct {v0, v1}, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;-><init>(Landroid/content/Context;)V

    .line 47
    iget-boolean v1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->showDescriptions:Z

    invoke-virtual {v0, p3, v1}, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->setModel(Llt/farmis/libraries/apps_promo/models/AppPromoModel;Z)V

    .line 48
    new-instance v1, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;

    invoke-direct {v1, p3, p0, p1}, Llt/farmis/libraries/apps_promo/AppsPromoDialog$onCreateView$$inlined$forEach$lambda$1;-><init>(Llt/farmis/libraries/apps_promo/models/AppPromoModel;Llt/farmis/libraries/apps_promo/AppsPromoDialog;Landroid/view/View;)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 56
    sget p3, Llt/farmis/libraries/apps_promo/R$id;->addsLayout:I

    invoke-virtual {p1, p3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p3

    check-cast p3, Landroid/widget/LinearLayout;

    invoke-virtual {p3, v0}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    goto :goto_1

    .line 46
    :cond_2
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V

    const/4 p1, 0x0

    throw p1

    :cond_3
    return-object p1
.end method

.method public synthetic onDestroyView()V
    .locals 0

    invoke-super {p0}, Landroidx/fragment/app/DialogFragment;->onDestroyView()V

    invoke-virtual {p0}, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->_$_clearFindViewByIdCache()V

    return-void
.end method

.method public onDismiss(Landroid/content/DialogInterface;)V
    .locals 4

    .line 66
    invoke-super {p0, p1}, Landroidx/fragment/app/DialogFragment;->onDismiss(Landroid/content/DialogInterface;)V

    .line 67
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iget-wide v2, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->shownAt:J

    sub-long/2addr v0, v2

    .line 68
    iget p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->INTEREST_LEVEL_3:I

    int-to-long v2, p1

    cmp-long p1, v2, v0

    if-gez p1, :cond_0

    .line 69
    iget-object p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->callbacks:Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

    if-eqz p1, :cond_3

    const/4 v0, 0x3

    invoke-interface {p1, v0}, Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;->onDismiss(I)V

    goto :goto_0

    .line 70
    :cond_0
    iget p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->INTEREST_LEVEL_2:I

    int-to-long v2, p1

    cmp-long p1, v2, v0

    if-gez p1, :cond_1

    .line 71
    iget-object p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->callbacks:Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

    if-eqz p1, :cond_3

    const/4 v0, 0x2

    invoke-interface {p1, v0}, Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;->onDismiss(I)V

    goto :goto_0

    .line 72
    :cond_1
    iget p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->INTEREST_LEVEL_1:I

    int-to-long v2, p1

    cmp-long p1, v2, v0

    if-gez p1, :cond_2

    .line 73
    iget-object p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->callbacks:Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

    if-eqz p1, :cond_3

    const/4 v0, 0x1

    invoke-interface {p1, v0}, Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;->onDismiss(I)V

    goto :goto_0

    .line 75
    :cond_2
    iget-object p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->callbacks:Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

    if-eqz p1, :cond_3

    const/4 v0, 0x0

    invoke-interface {p1, v0}, Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;->onDismiss(I)V

    :cond_3
    :goto_0
    return-void
.end method

.method public final setAppsModelList(Ljava/util/List;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Llt/farmis/libraries/apps_promo/models/AppPromoModel;",
            ">;)V"
        }
    .end annotation

    const-string v0, "<set-?>"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 29
    iput-object p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->appsModelList:Ljava/util/List;

    return-void
.end method

.method public final setCallbacks(Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;)V
    .locals 0

    .line 22
    iput-object p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->callbacks:Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

    return-void
.end method

.method public final setShowDescriptions(Z)V
    .locals 0

    .line 30
    iput-boolean p1, p0, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->showDescriptions:Z

    return-void
.end method
